package com.mxt.controller;

import com.mxt.biz.UserBiz;
import com.mxt.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author mxt
 * @date 2021/11/19 9:22
 */
@Controller
public class IndexController {
    @Resource
    private UserBiz userBiz;
    @RequestMapping("index")
    public  String index(Model model){
      List<User> list= userBiz.query();
      model.addAttribute("list",list);
        return  "index";
    }
}
